from django.contrib import admin

from .models import *


class RoleAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'role']


admin.site.register(Role, RoleAdmin)


class InstructorAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'instructor']


admin.site.register(Instructor, InstructorAdmin)


class StudentClassAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'classname', 'instructor_id']


admin.site.register(StudentClass, StudentClassAdmin)


class UserAdmin(admin.ModelAdmin):
    list_display = ['id', 'name', 'username', 'password']


admin.site.register(User, UserAdmin)


class UserInfoAdmin(admin.ModelAdmin):
    list_display = list_display_links = ['id', 'user_id', 'role_id', 'instructor_id', 'sex', 'student_class']


admin.site.register(UserInfo, UserInfoAdmin)
